package com.yangwudi.controller;


import com.yangwudi.pojo.OperateLogQueryParam;
import com.yangwudi.pojo.PageResult;
import com.yangwudi.pojo.Result;
import com.yangwudi.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/log/page")
@RestController
public class OperateLogController {

    @Autowired
    private OperateLogService operateLogService;
    /**
     * 日志信息的分页查询
     */
    @GetMapping
    public Result page(OperateLogQueryParam operateLogQueryParam) {
        log.info("日志信息分页查询:{}", operateLogQueryParam);
        PageResult pageResult =operateLogService.page(operateLogQueryParam);
        return Result.success(pageResult);
    }
}
